//
// Created by 33145 on 2023/6/3.
//
#include "../rocket/tcp/tcp_server.h"
#include "../rocket/tcp/net_addr.h"
#include <memory>
#include "../rocket/common/rocket.h"

void test_tcp_server() {
  rocket::IPNetAddr::ptr addr = std::make_shared<rocket::IPNetAddr>("127.0.0.1", 12345);
  LOG_DEBUG("create addr %s", addr->toString().c_str());
  rocket::TCPServer::ptr tcp_server = std::make_shared<rocket::TCPServer>(addr);
  tcp_server->start();
}

int main() {
  rocket::Config::SetGlobalConfig("/home/orange/tinytinyRPC/conf/rocket.xml");
  rocket::Logger::InitGlobalLogger(0);

  test_tcp_server();
}